package com.novax.ex.ai.http;

import lombok.Data;

import java.util.List;

@Data
public class Request {

    private String model;

    private List<Message> messages;

    public static Request builder() {
        return new Request();
    }

    public Request model(String model) {
        this.model = model;
        return this;
    }

    public Request messages(List<Message> messages) {
        this.messages = messages;
        return this;
    }

    public Request build() {
        return this;
    }

    public static Request defaultRequest(String question) {
        List<Message> deaultMessageList = Message.getDeaultMessageList(question);
        return Request.builder().model("gpt-3.5-turbo").messages(deaultMessageList).build();
    }
}
